package com.gebogebo.android.pub;

import android.app.Activity;
import android.graphics.Color;
import android.net.Uri;
import android.os.Bundle;
import android.util.Log;
import android.widget.ImageView;
import android.widget.RelativeLayout;
import android.widget.RelativeLayout.LayoutParams;

public class ViewImageActivity extends Activity {
	private static final String lg = "view";
	public static final String IMAGE_URL_EXTRA = "imageUrl";
	
    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.edit_image);
        
        ImageView imageView = (ImageView)findViewById(R.id.image);
        Log.i(lg, "image url:"  + getIntent().getParcelableExtra(IMAGE_URL_EXTRA));
        imageView.setImageURI((Uri)getIntent().getParcelableExtra(IMAGE_URL_EXTRA));
        loadDoodle(1);
    }
	
    private void loadDoodle(int id) {
        PubEditDoodleView doodleView = new PubEditDoodleView(getApplicationContext());
        doodleView.setIconId(R.drawable.arrow_down);
        RelativeLayout relLayout = (RelativeLayout)findViewById(R.id.imagesLayout);
        relLayout.addView(doodleView);
    }
}
